IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_UserGroupSave]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[cms_sp_UserGroupSave]
GO
create procedure [dbo].[cms_sp_UserGroupSave]
@Id int,
@SiteId int = null,
@SiteGroupId int = null,
@GroupName nvarchar(250),
@IsEnabled bit,
@IsSystem bit,
@LastUpdatedBy int,
@DateLastUpdated datetime
as
update [dbo].[UserGroups]
set [SiteId] = @SiteId,
	[SiteGroupId] = @SiteGroupId,
	[GroupName] = @GroupName,
	[IsEnabled] = @IsEnabled,
	[IsSystem] = @IsSystem,
	[LastUpdatedBy] = @LastUpdatedBy,
	[DateLastUpdated] = @DateLastUpdated
where [UserGroupId] = @Id


GO

